// 
// File:   main.cc
// Author: dnazarov
//
// Created on 2 Октябрь 2009 г., 15:49
//

#include <stdlib.h>
#include <iostream>
#include "serverstat.h"
#include "rtmon.h"
#include "agentstat.h"
#include "sockets/SocketHandler.h"
#include "sockets/ListenSocket.h"
#include <omp.h>

int main(int argc, char** argv)
{


        std::string mode = "";
        if (argc > 1)
                mode = argv[1];
        if (mode == "agent")
        {
                std::cout << "agent mode on" << std::endl;
                AgentStat as;
                as.listen();
        }
        else if (mode == "monitor")
        {
                std::cout << "monitor mode on" << std::endl;
                RTMon rtmon;
                rtmon.start();
        }
        else std::cout << "use jbmon with parameters: agent or monitor" << std::endl;

        return (EXIT_SUCCESS);
}